package org.usmile.algorithms.huawei.acm;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

// https://blog.csdn.net/qq_34465338/article/details/128708367
public class _红黑图 {
    private static int[][] edges;
    private static int n;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        int m = sc.nextInt();
        sc.nextLine();
        edges = new int[m][2];
        for (int i = 0; i < m; i++) {
            String[] edgeStr = sc.nextLine().split(" ");
            edges[i] = new int[]{Integer.parseInt(edgeStr[0]), Integer.parseInt(edgeStr[1])};
        }
        int count = 1;
        for (int red = 1; red <= n; red++) {
            count += dfs(-1, red, new HashSet<>());
        }

        System.out.println(count);
    }

    private static int dfs(int start, int redCount, Set<Integer> path) {
        if (path.size() == redCount) {
            for (int[] edge : edges) {
                if (path.contains(edge[0]) && path.contains(edge[1])) {
                    return 0;
                }
            }

            return 1;
        }

        int count = 0;
        for (int i = start + 1; i < n; i++) {
            path.add(i);
            count += dfs(i, redCount, path);
            path.remove(i);
        }

        return count;
    }
}
